import { http } from '@/utils/http/axios';
import { RequestEnum } from "@/enums/httpEnum";

/**
 * 获取聊天室列表
 */
export const getChatRooms = () => {
  return http.request({
    url: `/chat/room/list`,
    method: RequestEnum.GET
  })
}

/**
 * 获取在线用户列表
 */
export const getOnlineUserList = () => {
  return http.request({
    url: `/online/chat/list`,
    method: RequestEnum.GET
  })
}

/**
 * 获取聊天信息
 */
export const getChatMessageList = (params: {cursor: string | null, size: number}) => {
  return http.request({
    url: `/chat/message/list`,
    method: RequestEnum.GET,
    params
  })
}
